09. Installation
Installation
You are welcome to write all of your code in Udacity's web-based Workspaces. If, however, you prefer to work locally on your machine, you will need to install certain software.
## g++, gdb, make
macOS
macOS includes g++ as part of Command Line Tools.
- Launch Terminal , which can be found in the Utilities folder in Applications .
-
Type
xcode-select --install
into the Terminal window and press "Enter" - If you don't already have Xcode or Command Line Tools installed, a window will pop up. Press the Install button.
-
Verify:
Type
g++
into Terminal and press enter. If the output isclang: error: no input files
, then the installation was successful.
Linux
These programs are typically available through the default package manager for each Linux distribution. For example, we can use APT on Ubuntu systems.
-
sudo apt update
-
sudo apt install build-essential
-
sudo apt install gdb
Windows
MinGW provides the necessary software.
- Proceed from Section 3.2 of these linked instructions .
## Microsoft Visual Studio (VSCode):
The instructions for this are the same for all machines:
- Go to the Visual Studio Code download webpage
- Select your operating system.
![](img/screen-shot-2019-11-19-at-11.37.25-am.png)
- Click on the downloaded file
- Complete the installation instructions.
## VSCode C/C++ Extension
- Open VSCode
-
Navigate to VSCode extensions by clicking into the following menus:
- Code > Preferences > Extensions
![](img/screen-shot-2019-11-19-at-1.13.05-pm.png)
- In the search bar that says " Search Extensions in Marketplace " type " C/C++ "
![](img/screen-shot-2019-11-19-at-1.11.33-pm.png)
- Select the C/C++ extension and press the Install button to install this extension.
## clang-format
- This is also a VSCode extension, so navigate to Extensions using the same process as the previous section.
- In the search bar that says "Search Extensions in Marketplace", type: " clang-format "
![](img/screen-shot-2019-11-19-at-1.16.36-pm.png)
- Select the Clang-Format extension and press the Install button to install this extension.